Optimal. Leaf size=554 \[ -\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e^{3/2}}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {2 b \log \left (\frac {2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{c e}+\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}+\frac {i b^2 \text {Li}_2\left (1-\frac {2}{i c x+1}\right )}{c e} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.48, antiderivative size = 554, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {4916, 4846, 4920, 4854, 2402, 2315, 4914, 4858} \[ -\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e^{3/2}}+\frac {b^2 \sqrt {-d} \text {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{4 e^{3/2}}+\frac {i b^2 \text {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{c e}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e^{3/2}}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {2 b \log \left (\frac {2}{1+i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{c e} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2315
Rule 2402
Rule 4846
Rule 4854
Rule 4858
Rule 4914
Rule 4916
Rule 4920
Rubi steps
\begin {align*} \int \frac {x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{d+e x^2} \, dx &=\frac {\int \left (a+b \tan ^{-1}(c x)\right )^2 \, dx}{e}-\frac {d \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{d+e x^2} \, dx}{e}\\ &=\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}-\frac {(2 b c) \int \frac {x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{e}-\frac {d \int \left (\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (\sqrt {-d}+\sqrt {e} x\right )}\right ) \, dx}{e}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {(2 b) \int \frac {a+b \tan ^{-1}(c x)}{i-c x} \, dx}{e}-\frac {\sqrt {-d} \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt {-d}-\sqrt {e} x} \, dx}{2 e}-\frac {\sqrt {-d} \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 e}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{c e}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {\left (2 b^2\right ) \int \frac {\log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{e}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{c e}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}+\frac {\left (2 i b^2\right ) \operatorname {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i c x}\right )}{c e}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{c e}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b^2 \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c e}-\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 180.00, size = 0, normalized size = 0.00 \[ \text {\$Aborted} \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.44, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} x^{2} \arctan \left (c x\right )^{2} + 2 \, a b x^{2} \arctan \left (c x\right ) + a^{2} x^{2}}{e x^{2} + d}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 6.46, size = 0, normalized size = 0.00 \[ \int \frac {x^{2} \left (a +b \arctan \left (c x \right )\right )^{2}}{e \,x^{2}+d}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -a^{2} {\left (\frac {d \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{\sqrt {d e} e} - \frac {x}{e}\right )} + \frac {4 \, b^{2} x \arctan \left (c x\right )^{2} - b^{2} x \log \left (c^{2} x^{2} + 1\right )^{2} + e \int \frac {12 \, {\left (b^{2} c^{2} e x^{4} + b^{2} e x^{2}\right )} \arctan \left (c x\right )^{2} + {\left (b^{2} c^{2} e x^{4} + b^{2} e x^{2}\right )} \log \left (c^{2} x^{2} + 1\right )^{2} + 8 \, {\left (4 \, a b c^{2} e x^{4} - b^{2} c e x^{3} - b^{2} c d x + 4 \, a b e x^{2}\right )} \arctan \left (c x\right ) + 4 \, {\left (b^{2} c^{2} e x^{4} + b^{2} c^{2} d x^{2}\right )} \log \left (c^{2} x^{2} + 1\right )}{c^{2} e^{2} x^{4} + {\left (c^{2} d e + e^{2}\right )} x^{2} + d e}\,{d x}}{16 \, e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {x^2\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{e\,x^2+d} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x^{2} \left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2}}{d + e x^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________